﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/TabPage.Master" AutoEventWireup="true"
    CodeBehind="DetrQuery.aspx.cs" Inherits="eTerm.Platform.Web.PNR.DetrQuery" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" type="text/javascript">
        function OpenExecl(U, S, E, T) {
            var StatusID = 0;
            var Str = "";
            $("input:checked", T).each(function() {
                StatusID = StatusID | parseInt($("label span", $(this).parent()).text());
            });
            $.jBox("iframe:ExportExcel.aspx?StartDate=" + $(S).val() + "&EndDate=" + $(E).val() + "&UID=" + $(U).val() + "&StatusID=" + StatusID+"&QueryStr="+Str, { loaded: function(h) { $.jBox.close(true); }, title: '票号导出', timeout: 5000 });
        }


        function OpenDetail(I) {
            $.jBox("post:DetrDetail.aspx", { ajaxData: { ID:I }, loaded: function(h) {  }, title: '票号详情',bottomText:'列举票号航班明细' });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpButtons" runat="server">
    <table cellpadding="0" cellspacing="1px" border="0" style="width: 100%;" bgcolor="b5d6e6">
        <tr style="background-color: White; height: 32px;">
            <td align="right" style="width: 80px;">
                处理时间:&nbsp;&nbsp;
            </td>
            <td style="padding: 5px">
                <asp:TextBox runat="server" ID="tbStartDate"></asp:TextBox>
                ~
                <asp:TextBox runat="server" ID="tbEndDate"></asp:TextBox>
            </td>
            <td align="right">
                提交用户:&nbsp;&nbsp;
            </td>
            <td style="padding: 5px">
                <asp:DropDownList runat="server" ID="dlUploader">
                </asp:DropDownList>
            </td>
            <td align="right">
                票号:&nbsp;&nbsp;
            </td>
            <td style="padding: 5px">
                <asp:TextBox MaxLength="15" runat="server" ID="tbTicketNo"></asp:TextBox>
            </td>
        </tr>
        <tr style="background-color: White; height: 26px;">
            <td align="right">
                状态:&nbsp;&nbsp;
            </td>
            <td colspan="4" style="padding: 5px">
                <asp:CheckBoxList RepeatColumns="5" runat="server" ID="chkStatus">
                </asp:CheckBoxList>
            </td>
            <td align="right" colspan="2" style="padding-right:25px;">
                <asp:LinkButton runat="server" ID="btnExport" Text="导出" 
                    onclick="btnExport_Click" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:LinkButton runat="server" ID="btnQuery" Text="查询" OnClick="btnQuery_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpContent" runat="server">
    <asp:AspNetPager ID="AspNetPager1" CssClass="paginator" CurrentPageButtonClass="cpb"
        runat="server" AlwaysShow="True" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
        PageSize="20" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowInputBox="Never"
        OnPageChanging="AspNetPager1_PageChanging" CustomInfoTextAlign="Left" LayoutType="Table">
    </asp:AspNetPager>
    <asp:Repeater runat="server" EnableViewState="false" OnItemDataBound="rptDetr_OnItemDataBound" ID="rptDetr">
        <HeaderTemplate>
            <div class="datagrid-header">
                <div class="datagrid-header-inner" style="display: block;">
                    <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>
                                <div class="datagrid-cell" style="width: 40px; text-align: center; cursor: default;">
                                    <span>编号</span><span class="datagrid-sort-icon">&nbsp;</span></div>
                            </td>
                            <td>
                                <div class="datagrid-cell" style="width: 156px; text-align: center;">
                                    <span>票号</span><span class="datagrid-sort-icon">&nbsp;</span></div>
                            </td>
                            <td>
                                <div class="datagrid-cell" style="width: 90px; text-align: center;">
                                    <span>状态</span><span class="datagrid-sort-icon">&nbsp;</span></div>
                            </td>
                            <td>
                                <div class="datagrid-cell" style="width: 156px; text-align: center;">
                                    <span>出票日期</span><span class="datagrid-sort-icon">&nbsp;</span></div>
                            </td>
                            <td>
                                <div class="datagrid-cell" style="width: 120px; text-align: center;">
                                    <span>操作用户</span><span class="datagrid-sort-icon">&nbsp;</span></div>
                            </td>
                            <td>
                                <div class="datagrid-cell" style="width: 156px; text-align: center;">
                                    <span>最后处理时间</span><span class="datagrid-sort-icon">&nbsp;</span></div>
                            </td>
                            <td>
                                <div style="text-align: left; width: 220px; text-align: center; white-space: normal"
                                    class="datagrid-cell ">
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="datagrid-body">
                <table border="0" cellspacing="0" cellpadding="0">
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="datagrid-row-alt">
                <td>
                    <div style="text-align: left; width: 40px; text-align: center; white-space: normal"
                        class="datagrid-cell ">
                        <%#Eval("Id") %></div>
                </td>
                <td>
                    <div style="text-align: left; width: 156px; text-align: center; white-space: normal"
                        class="datagrid-cell ">
                        <asp:HyperLink runat="server" ID="lnkTicketNo" Text='<%#Eval("TicketNo") %>'></asp:HyperLink>
                        </div>
                </td>
                <td>
                    <div style="text-align: left; width: 90px; text-align: center; white-space: normal"
                        class="datagrid-cell ">
                        <asp:Literal runat="server" ID="litStatusName"></asp:Literal></div>
                </td>
                <td>
                    <div style="text-align: left; text-align: center; width: 156px; white-space: normal"
                        class="datagrid-cell ">
                        <%#((DateTime?)Eval("TicketDate")).HasValue?((DateTime?)Eval("TicketDate")).Value.ToString(@"yyyy-MM-dd"):string.Empty %>
                    </div>
                </td>
                <td>
                    <div style="text-align: left; text-align: center; width: 120px; white-space: normal"
                        class="datagrid-cell ">
                        <asp:Literal runat="server" ID="lbDisplayName"></asp:Literal>
                    </div>
                </td>
                <td>
                    <div style="text-align: left; width: 156px; text-align: center; white-space: normal"
                        class="datagrid-cell ">
                        <%#((DateTime)Eval("ProcessDate")).ToString(@"yyyy-MM-dd HH:mm")%>
                </td>
                <td>
                    <div style="text-align: left; width: 220px; text-align: left; white-space: normal"
                        class="datagrid-cell ">
                        <asp:LinkButton runat="server" ID="lnkHistory" Text="历史"></asp:LinkButton>
                        <asp:LinkButton runat="server" ID="lnkComplete" Text="手工完成"></asp:LinkButton>
                    </div>
                </td>
            </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <tr style="text-align: center;">
                <td>
                    <div style="text-align: left; width: 40px; text-align: center; white-space: normal"
                        class="datagrid-cell ">
                        <%#Eval("Id") %></div>
                </td>
                <td>
                    <div style="text-align: left; width: 156px; text-align: center; white-space: normal"
                        class="datagrid-cell ">
                        <asp:HyperLink runat="server" ID="lnkTicketNo" Text='<%#Eval("TicketNo") %>'></asp:HyperLink></div>
                </td>
                <td>
                    <div style="text-align: left; width: 90px; text-align: center; white-space: normal"
                        class="datagrid-cell ">
                        <asp:Literal runat="server" ID="litStatusName"></asp:Literal>
                    </div>
                </td>
                <td>
                    <div style="text-align: left; text-align: center; width: 156px; white-space: normal"
                        class="datagrid-cell ">
                        <%#((DateTime?)Eval("TicketDate")).HasValue?((DateTime?)Eval("TicketDate")).Value.ToString(@"yyyy-MM-dd"):string.Empty %>
                    </div>
                </td>
                <td>
                    <div style="text-align: left; text-align: center; width: 120px; white-space: normal"
                        class="datagrid-cell ">
                        <asp:Literal runat="server" ID="lbDisplayName"></asp:Literal>
                    </div>
                </td>
                <td>
                    <div style="text-align: left; width: 156px; text-align: center; white-space: normal"
                        class="datagrid-cell ">
                        <%#((DateTime)Eval("ProcessDate")).ToString(@"yyyy-MM-dd HH:mm")%>
                </td>
                <td>
                    <div style="text-align: left; width: 220px; text-align: left; white-space: normal"
                        class="datagrid-cell ">
                        <asp:LinkButton runat="server" ID="lnkHistory" Text="历史"></asp:LinkButton>
                        
                        <asp:LinkButton runat="server" ID="lnkComplete" Text="手工完成"></asp:LinkButton>
                    </div>
                </td>
            </tr>
        </AlternatingItemTemplate>
        <FooterTemplate>
            </table> </div>
        </FooterTemplate>
    </asp:Repeater>
    <asp:AspNetPager ID="AspNetPager2" runat="server" CloneFrom="AspNetPager1">
    </asp:AspNetPager>
</asp:Content>
